
<h3><img src="<?php echo base_url(); echo "/application/images/relic/residents.png"; ?>" width="30px" height="30px" align="left"/>Resident's Information</h3>
<?php $row = $info->row();?>
<div id="content">

	<h3><a href="#section1">Basic Information</a></h3>
	<div>
		<table class="centeredtable">
			<tr><td width="120px"></td><td width="300px"></td></tr>
			<tr><td>Student Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->student_number;?>"/></td></tr>
			<tr><td>First Name:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->first_name;?>"/></td></tr>
			<tr><td>Middle Name:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->middle_name;?>"/></td></tr>
			<tr><td>Last Name:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->last_name;?>"/></td></tr>
			<tr><td>Gender:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->gender;?>"/></td></tr>
			<tr><td>Civil Status:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->civil_status;?>"/></td></tr>
			<tr><td>Birthday:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->birthday;?>"/></td></tr>
			<tr><td>Religion:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->religion;?>"/></td></tr>
		</table>
	</div>
	
	<h3><a href="#section2">College and Contact Information</a></h3>
	<div>
		<table class="centeredtable">
			<tr><td width="120px"></td><td width="300px"></td></tr>
			<tr><td>Course:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->course;?>"/></td></tr>
			<tr><td>College:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->college;?>"/></td></tr>
			<tr><td>Classification:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->classification;?>"/></td></tr>
			<tr><td>Home Address:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->home_address;?>"/></td></tr>
			<tr><td>Telephone Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->telephone_number;?>"/></td></tr>
			<tr><td>Email Address:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->email_address;?>"/></td></tr>
			<tr><td>Region:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->region;?>"/></td></tr>
		</table>
	</div>
	
	<h3><a href="#section3">Other Information</a></h3>
	<div>
		<table class="centeredtable">
			<tr><td width="120px"></td><td width="300px"></td></tr>
			<tr><td>Name of Father:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->name_of_father;?>"/></td></tr>
			<tr><td>Contact Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->telnumber_of_father;?>"/></td></tr>
			<tr><td>Name of Mother:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->name_of_mother;?>"/></td></tr>
			<tr><td>Contact Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->telnumber_of_mother;?>"/></td></tr>
			<tr><td>Guardian:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->name_of_guardian;?>"/></td></tr>
			<tr><td>Contact Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->telnumber_of_guardian;?>"/></td></tr>
		</table>
	</div>
	
</div><!-- End content -->
<br/>
<form name="residentform" method="post" onSubmit="return OnSubmitForm();">
	<input type="hidden" value="<?php echo $row->student_number;?>" name="student_number"/>
	<input type="submit" value="Edit Resident" class="shortobject" onClick="document.pressed=this.value"/>
	<input type="submit" value="Delete Resident" class="shortobject" onClick="document.pressed=this.value"/>
	<input type="submit" value="Back to Main" class="shortobject" onClick="document.pressed=this.value"/>
</form>

<h3>Dormitory Stuffs</h3>
<div id="dormitorystuffs">

	<h3><a href="#section1">Appliances</a></h3>
	<div>
		<form name="applianceform" method="post" onSubmit="return OnSubmitForm2();">
		<?php if($appInfo->num_rows()>0){?>
		<h3 class="centeredtext">Existing Appliances</h3>
		<table class="centeredtable" border="1">
			<thead class="centeredtext">
				<tr>
					<th width="60px">Choose</th>
					<th width="155px">Appliance Type</th>
					<th width="155px">Control Number</th>
				</tr>
			</thead>
			<tbody class="centeredtext">
			<?php foreach($appInfo->result() as $row):?>
			<tr>
				<td><input type="radio" name="choice" value="<?php echo $row->control_number;?>"/></td>
				<td><?php echo $row->type_of_appliance;?></td>
				<td><?php echo $row->control_number;?></td>
			</tr>
			<?php endforeach;?>
			</tbody>
		</table>
		<br/>
			<input type="submit" value="View Appliance" class="shortobject" onClick="document.pressed=this.value"/>
			<input type="submit" value="Edit Appliance" class="shortobject" onClick="document.pressed=this.value"/>
			<input type="submit" value="Delete Appliance" class="shortobject" onClick="document.pressed=this.value"/>
		<br/>
		<br/>
		<hr/>
		<?php }?>
		<h3 class="centeredtext"><img src="<?php echo base_url(); echo "/application/images/relic/app.png"; ?>" width="30px" height="30px" align="left"/>Add New Appliance</h3>
		<table class="centeredtable">
			<tr><td width="120px"></td><td width="300px"></td></tr>
			<tr><td>Appliance Type:</td><td>
				<select name="type_of_appliance" class="longobject2">
					<option selected="selected">Computer</option>
					<option>Computer_with_Printer</option>
					<option>Refrigerator</option>
					<option>Fan</option>
					<option>Radio</option>
				</select>
			</td></tr>
			<tr><td>Control Number:</td><td><input type="text" class="longobject2" name="control_number"/></td></tr>
			<tr><td>Date Installed:</td><td><input type="text" id="datepicker" class="longobject2" name="date_installed"/></td></tr>
			<tr><td>Date Cancelled:</td><td><input type="text" id="datepicker2" class="longobject2" name="date_cancelled"/></td></tr>
			<tr><td>Remarks:</td><td><textarea class="longobject2" rows="2" name="remark"/></textarea></td></tr>
		</table>
			<br/>
			<input type="hidden" value="<?php echo $row->student_number;?>" name="student_number"/>
			<input type="reset" value="Reset" class="shortobject"/>
			<input type="submit" value="Add Appliance" class="shortobject" onClick="document.pressed=this.value"/>
			<input type="submit" value="Back to Main" class="shortobject" onClick="document.pressed=this.value"/>
		</form>
	</div>
	
	<h3><a href="#section1">Payments</a></h3>
	<div>
		<form name="paymentform" method="post" onSubmit="return OnSubmitForm3();">
		<?php if($payInfo->num_rows()>0){?>
		<h3 class="centeredtext">Existing Payments</h3>
		<table class="centeredtable" border="1">
			<thead class="centeredtext">
				<tr>
					<th width="60px">Choose</th>
					<th width="155px">Payment Type</th>
					<th width="155px">OR Number</th>
				</tr>
			</thead>
			<tbody class="centeredtext">
			<?php foreach($payInfo->result() as $row):?>
			<tr>
				<td><input type="radio" name="choice" value="<?php echo $row->or_number;?>"/><input type="hidden" name="type_hidden" value="<?php echo $row->type;?>"/></td>
				<td><?php echo $row->type;?></td>
				<td><?php echo $row->or_number;?></td>
			</tr>
			<?php endforeach;?>
			</tbody>
		</table>
		<br/>
			<input type="submit" value="View Payment" class="shortobject" onClick="document.pressed=this.value"/>
			<input type="submit" value="Edit Payment" class="shortobject" onClick="document.pressed=this.value"/>
			<input type="submit" value="Delete Payment" class="shortobject" onClick="document.pressed=this.value"/>
		<br/>
		<br/>
		<hr/>
		<?php }?>
		<h3 class="centeredtext"><img src="<?php echo base_url(); echo "/application/images/relic/payment.png"; ?>" height="30px" align="left"/>Add New Payment</h3>
		<table class="centeredtable">
			<tr><td width="120px"></td><td width="300px"></td></tr>
			<tr><td>Payment Type:</td><td>
				<select name="type" class="longobject">
					<option>Dormitory</option>
					<option>Appliance</option>
					<option>Transient</option>
				</select>
			</td></tr>
			<tr><td>OR Number:</td><td><input type="text" class="longobject2" name="or_number"/></td></tr>
			<tr><td>From Period:</td><td><input type="text" id="datepicker3" class="longobject2" name="from_period"/></td></tr>
			<tr><td>To Period:</td><td><input type="text" id="datepicker4" class="longobject2" name="to_period"/></td></tr>
			<tr><td>Amount:</td><td><input type="text" class="longobject2" name="amount"/></td></tr>
			<tr><td>Date Paid:</td><td><input type="text" id="datepicker5" class="longobject2" name="date_paid"/></td></tr>
			<tr><td>Remarks:</td><td><textarea class="longobject2" rows="2" name="remark"/></textarea></td></tr>
		</table>
			<br/>
			<input type="hidden" value="<?php echo $row->student_number;?>" name="student_number"/>
			<input type="reset" value="Reset" class="shortobject"/>
			<input type="submit" value="Add Payment" class="shortobject" onClick="document.pressed=this.value"/>
			<input type="submit" value="Back to Main" class="shortobject" onClick="document.pressed=this.value"/>
		</form>
	</div>
	
</div><!-- End dormitorystuffs -->
